<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <meta name="layout" content="stmain"/>
  <title>SimTester - Running AWS Instances</title>
</head>
<body>
  <h2>Running Instances</h2>
  <table class="sttable">
    <thead>
      <tr>
        <th>Cloud ID</th>
        <th>AMI ID</th>
        <th>Type</th>
        <th>Status</th>
        <th>Date Created</th>
      </tr>
    </thead>
    <tbody>
      <g:if test="${instances.isEmpty()}">
        <tr>
          <td colspan="4" style="text-align:center">
            No running instances
          <td>
        </tr>
      </g:if>
      <g:else>
        <g:each in="${instances}" var="i">
          <tr>
            <td>${i.cloudId}</td>
            <td>${i.amiId}</td>
            <td>${i.type}</td>
            <td>${i.status}</td>
            <td><g:formatDate date="${i.dateCreated}" format="MM/dd/yyyy HH:mm:ss"/></td>
          </tr>
        </g:each>
      </g:else>
    </tbody>
  </table>
</body>
</html>